/* -*- C++ -*- */

//=============================================================================
/*
 * @author Feloweria <380374483@qq.com>
 * Copyright (C) Feloweria
 * 
 * $ID 2013-09-27 07:45:52 PM
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * 
 * @version 1.0
 */
//=============================================================================

FELOWRIA_BEGIN

inline
timespec ToTimespec(Felowria::TimeValue time_value)
{
	timespec time;
	time.tv_sec = time_value;
	time.tv_nsec = (time_value - time.tv_sec) * TIME_ONE_NAO_SECOND;
	
	return time;
}

FELOWRIA_END